package com.inifitness.message.processor.message;

import com.inifitness.common.event.event.MessageEvent;
import com.inifitness.message.service.EventTemplate;

import lombok.extern.log4j.Log4j2;
import org.slf4j.helpers.MessageFormatter;
import org.springframework.stereotype.Component;

/**
 * Email消息处理
 *
 * @author sunjinfeng
 * @version 1.0.0
 * @since 2024-05-29 12:50
 */
@Component
@Log4j2
public class EmailProcessor implements MessageProcessor {
  @Override
  public void process(MessageEvent event, EventTemplate template) {
    log.info(()-> MessageFormatter.format("消息内容：{}", parseMessage(event, template.getTemplate())));
  }
}
